package com.cnswhy.cloud.server.system.configure;

import com.cnswhy.cloud.common.core.base.boot.BaseConfig;
import com.cnswhy.cloud.common.datasource.service.UidGenerator;
import com.cnswhy.cloud.server.system.service.impl.RedisUidGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class CnswhyServerSystemResourceServerConfigure extends BaseConfig {
    @Bean("uidGenerator")
    @ConditionalOnMissingBean
    public UidGenerator uidGenerator() {
        return new RedisUidGenerator();
    }
}
